
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Git Commands · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="high-quality-code.html" />
    
    
    <link rel="prev" href="git commit style.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    前端进阶
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Grid System.html">
            
                <a href="Grid System.html">
            
                    
                    Grid System
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="Handwritten signature.html">
            
                <a href="Handwritten signature.html">
            
                    
                    Handwritten Signature
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="Mobile Soft Keyboard.html">
            
                <a href="Mobile Soft Keyboard.html">
            
                    
                    Mobile Soft Keyboard
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="authentication.html">
            
                <a href="authentication.html">
            
                    
                    Authentication
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    Code
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" >
            
                <span>
            
                    
                    Four Operations
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="control loading.html">
            
                <a href="control loading.html">
            
                    
                    Control Loading
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="downfile.html">
            
                <a href="downfile.html">
            
                    
                    Downfile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="dynamic-routing.html">
            
                <a href="dynamic-routing.html">
            
                    
                    Dynamic Routing
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="ecs.html">
            
                <a href="ecs.html">
            
                    
                    Ecs
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="engineering.html">
            
                <a href="engineering.html">
            
                    
                    Engineering
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="eslint-vscode-format.html">
            
                <a href="eslint-vscode-format.html">
            
                    
                    Eslint Vscode Format
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="eventloop.html">
            
                <a href="eventloop.html">
            
                    
                    Eventloop
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="four-operations-1.html">
            
                <a href="four-operations-1.html">
            
                    
                    Four Operations 1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="four-operations-2.html">
            
                <a href="four-operations-2.html">
            
                    
                    Four Operations 2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="four-operations-3.html">
            
                <a href="four-operations-3.html">
            
                    
                    Four Operations 3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="four-operations-4.html">
            
                <a href="four-operations-4.html">
            
                    
                    Four Operations 4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="front end summary.html">
            
                <a href="front end summary.html">
            
                    
                    Front End Summary
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20" data-path="git commit style.html">
            
                <a href="git commit style.html">
            
                    
                    Git Commit Style
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.21" data-path="git-commands.html">
            
                <a href="git-commands.html">
            
                    
                    Git Commands
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.22" data-path="high-quality-code.html">
            
                <a href="high-quality-code.html">
            
                    
                    High Quality Code
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.23" data-path="history.html">
            
                <a href="history.html">
            
                    
                    History
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.24" data-path="html-tag.html">
            
                <a href="html-tag.html">
            
                    
                    Html Tag
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.25" data-path="http-https-http2.html">
            
                <a href="http-https-http2.html">
            
                    
                    Http Https Http2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.26" data-path="ignore log.html">
            
                <a href="ignore log.html">
            
                    
                    Ignore Log
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.27" >
            
                <span>
            
                    
                    Imgs
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.28" data-path="javascript-optimization.html">
            
                <a href="javascript-optimization.html">
            
                    
                    Javascript Optimization
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.29" data-path="local application.html">
            
                <a href="local application.html">
            
                    
                    Local Application
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.30" data-path="locality.html">
            
                <a href="locality.html">
            
                    
                    Locality
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.31" data-path="loop-unrolling.html">
            
                <a href="loop-unrolling.html">
            
                    
                    Loop Unrolling
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.32" data-path="mobile recommendation.html">
            
                <a href="mobile recommendation.html">
            
                    
                    Mobile Recommendation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.33" data-path="modal.html">
            
                <a href="modal.html">
            
                    
                    Modal
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.34" data-path="monitor.html">
            
                <a href="monitor.html">
            
                    
                    Monitor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.35" data-path="performance.html">
            
                <a href="performance.html">
            
                    
                    Performance
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.36" data-path="print-talbe.html">
            
                <a href="print-talbe.html">
            
                    
                    Print Talbe
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.37" data-path="promise.html">
            
                <a href="promise.html">
            
                    
                    Promise
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.38" data-path="teaching.html">
            
                <a href="teaching.html">
            
                    
                    Teaching
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.39" data-path="vue refresh.html">
            
                <a href="vue refresh.html">
            
                    
                    Vue Refresh
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.40" data-path="vue-page-not-refresh.html">
            
                <a href="vue-page-not-refresh.html">
            
                    
                    Vue Page Not Refresh
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.41" data-path="why-learn-theory.html">
            
                <a href="why-learn-theory.html">
            
                    
                    Why Learn Theory
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Git Commands</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="git-&#x5E38;&#x7528;&#x547D;&#x4EE4;&#x4ECB;&#x7ECD;">git &#x5E38;&#x7528;&#x547D;&#x4EE4;&#x4ECB;&#x7ECD;</h1>
<h3 id="1-git-add-file">1. <code>git add &lt;file&gt;</code></h3>
<p>&#x5C06; <code>file.txt</code> &#x6587;&#x4EF6;&#x6DFB;&#x52A0;&#x5230;&#x6682;&#x5B58;&#x533A;&#x3002;</p>
<pre><code>git add file.txt
</code></pre><p>&#x5C06;&#x5F53;&#x524D;&#x6240;&#x6709;&#x6709;&#x53D8;&#x52A8;&#x7684;&#x6587;&#x4EF6;&#x6DFB;&#x52A0;&#x5230;&#x6682;&#x5B58;&#x533A;&#x3002;</p>
<pre><code>git add .
</code></pre><h3 id="2-git-commit">2. <code>git commit</code></h3>
<p>&#x5C06;&#x6682;&#x5B58;&#x533A;&#x7684;&#x6587;&#x4EF6;&#x63D0;&#x4EA4;&#x5230;&#x5F53;&#x524D;&#x5206;&#x652F;&#x3002;</p>
<pre><code class="lang-git">git commit -m &apos;&#x5C06;&#x521A;&#x624D;&#x6DFB;&#x52A0;&#x5230;&#x6682;&#x5B58;&#x533A;&#x7684;&#x6587;&#x4EF6;&#x63D0;&#x4EA4;&#x5230;&#x5F53;&#x524D;&#x5206;&#x652F;&#xFF0C;-m &#x4EE3;&#x8868;&#x8981;&#x52A0;&#x6CE8;&#x91CA;&apos;
</code></pre>
<h3 id="3-git-push-&#x8FDC;&#x7A0B;&#x4E3B;&#x673A;&#x540D;-&#x5206;&#x652F;&#x540D;">3. <code>git push &lt;&#x8FDC;&#x7A0B;&#x4E3B;&#x673A;&#x540D;&gt; &lt;&#x5206;&#x652F;&#x540D;&gt;</code></h3>
<p>&#x63A8;&#x9001;&#x5206;&#x652F;&#xFF0C;&#x5C31;&#x662F;&#x628A;&#x8BE5;&#x5206;&#x652F;&#x4E0A;&#x7684;&#x6240;&#x6709;&#x672C;&#x5730;&#x63D0;&#x4EA4;&#x63A8;&#x9001;&#x5230;&#x8FDC;&#x7A0B;&#x5E93;&#x3002;</p>
<pre><code>git push origin master
</code></pre><p>&#x4E0A;&#x9762;&#x547D;&#x4EE4;&#x8868;&#x793A;&#xFF0C;&#x5C06;&#x672C;&#x5730;&#x7684; master &#x5206;&#x652F;&#x63A8;&#x9001;&#x5230; origin &#x4E3B;&#x673A;&#x7684; master &#x5206;&#x652F;&#x3002;&#x5982;&#x679C; master &#x4E0D;&#x5B58;&#x5728;&#xFF0C;&#x5219;&#x4F1A;&#x88AB;&#x65B0;&#x5EFA;&#x3002;</p>
<p>&#x8FDC;&#x7A0B;&#x5E93;&#x7684;&#x540D;&#x5B57;&#x5C31;&#x662F; origin&#xFF0C;&#x8FD9;&#x662F; Git &#x9ED8;&#x8BA4;&#x7684;&#x53EB;&#x6CD5;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x6539;&#x6210;&#x522B;&#x7684;&#xFF0C;&#x4F46;&#x662F; origin &#x8FD9;&#x4E2A;&#x540D;&#x5B57;&#x4E00;&#x770B;&#x5C31;&#x77E5;&#x9053;&#x662F;&#x8FDC;&#x7A0B;&#x5E93;&#x3002;</p>
<p>&#x63A8;&#x9001;&#x5230;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93; dev &#x5206;&#x652F;&#x3002;</p>
<pre><code>git push origin dev
</code></pre><p><strong>&#x7B2C;&#x4E00;&#x6B21;&#x4F7F;&#x7528;&#x65F6;&#x8981;&#x5E26;&#x4E0A; <code>-u</code> &#x53C2;&#x6570;</strong></p>
<pre><code>git push -u origin master
</code></pre><p>&#x4EE5;&#x540E;&#x6BCF;&#x6B21;&#x63D0;&#x4EA4;&#x5C31;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x4F7F;&#x7528; <code>git push</code> &#x4E86;&#xFF0C;&#x4E0D;&#x7528;&#x6BCF;&#x6B21;&#x90FD;&#x8F93;&#x4E0A;&#x4E00;&#x4E32;&#x547D;&#x4EE4;&#x3002;</p>
<pre><code>git push
</code></pre><h3 id="4-git-pull">4. <code>git pull</code></h3>
<p><code>git pull</code> &#x5C06;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#x7684;&#x66F4;&#x65B0;&#x62C9;&#x53D6;&#x4E0B;&#x6765;&#xFF0C;&#x518D;&#x548C;&#x672C;&#x5730;&#x5206;&#x652F;&#x8FDB;&#x884C;&#x5408;&#x5E76;&#x3002;</p>
<h3 id="5-git-branch-git-checkout">5. <code>git branch</code> <code>git checkout</code></h3>
<p><code>git branch</code> &#x67E5;&#x770B;&#x5F53;&#x524D;&#x6240;&#x6709;&#x5206;&#x652F;
<code>git branch &lt;name&gt;</code> &#x521B;&#x5EFA;&#x5206;&#x652F;
<code>git checkout &lt;name&gt;</code> &#x5207;&#x6362;&#x5206;&#x652F;</p>
<p>&#x521B;&#x5EFA;&#x5206;&#x652F; dev</p>
<pre><code>git branch dev
</code></pre><p>&#x5207;&#x6362;&#x5230;&#x5206;&#x652F; dev</p>
<pre><code>git checkout dev
</code></pre><h3 id="6-git-log">6. <code>git log</code></h3>
<p><code>git log</code> &#x547D;&#x4EE4;&#x53EF;&#x4EE5;&#x67E5;&#x770B;&#x63D0;&#x4EA4;&#x7684;&#x5386;&#x53F2;&#x8BB0;&#x5F55;&#x3002;</p>
<pre><code>E:\res\platform&gt;git log
commit 783ec77f1447125971aa2651e4320a768938d453 (HEAD -&gt; 3.0, origin/3.0)
Author: woai3c &lt;411020382@qq.com&gt;
Date:   Wed Apr 22 14:19:00 2020 +0800

    chore: &#x53EA;&#x6709;&#x6253;&#x5305;&#x65F6;&#x624D;&#x5E94;&#x7528;&#x5FFD;&#x7565; console.log &#x8BED;&#x53E5;

commit 514cf81798a14b3bf273019d02885f87bf8ad2ac
Author: woai3c &lt;411020382@qq.com&gt;
Date:   Wed Apr 22 13:40:11 2020 +0800

    feat: &#x6DFB;&#x52A0;&#x5168;&#x5C40; log &#x51FD;&#x6570;
</code></pre><p>&#x5982;&#x679C;&#x4E0D;&#x60F3;&#x663E;&#x793A;&#x65E0;&#x7528;&#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>git log --pretty=oneline</code></p>
<pre><code>E:\res\platform&gt;git log --pretty=oneline
783ec77f1447125971aa2651e4320a768938d453 (HEAD -&gt; 3.0, origin/3.0) chore: &#x53EA;&#x6709;&#x6253;&#x5305;&#x65F6;&#x624D;&#x5E94;&#x7528;&#x5FFD;&#x7565; console.log &#x8BED;&#x53E5;
514cf81798a14b3bf273019d02885f87bf8ad2ac feat: &#x6DFB;&#x52A0;&#x5168;&#x5C40; log &#x51FD;&#x6570;
2f0e28962d3f2d5e9c047387560986411d2a07d0 chore: &#x66F4;&#x65B0; eslint &#x89C4;&#x5219;
</code></pre><h3 id="7-git-reset">7. <code>git reset</code></h3>
<p><code>git reset</code> &#x547D;&#x4EE4;&#x7528;&#x4E8E;&#x7248;&#x672C;&#x56DE;&#x9000;&#x3002;
&#x5047;&#x5982;&#x4F60;&#x6B63;&#x5728;&#x5F00;&#x53D1;&#x4E00;&#x4E2A;&#x9879;&#x76EE;&#xFF0C;&#x6709;&#x4E00;&#x5929;&#x4EA7;&#x54C1;&#x63D0;&#x4E86;&#x4E2A;&#x65B0;&#x529F;&#x80FD;&#xFF0C;&#x8981;&#x6C42;&#x4E09;&#x5929;&#x5185;&#x5B8C;&#x6210;&#xFF0C;&#x4E8E;&#x662F;&#x4F60;&#x5FEB;&#x9A6C;&#x52A0;&#x97AD;&#x3001;&#x52A0;&#x73ED;&#x52A0;&#x70B9;&#x7EC8;&#x4E8E;&#x5728;&#x4E09;&#x5929;&#x5185;&#x5B8C;&#x6210;&#x4E86;&#x3002;
&#x7ED3;&#x679C;&#x7B2C;&#x56DB;&#x5929;&#x4EA7;&#x54C1;&#x544A;&#x8BC9;&#x4F60;&#x65B0;&#x529F;&#x80FD;&#x4E0D;&#x8981;&#x4E86;&#x3002;&#x4F60;&#x60F3;&#x6253;&#x6B7B;&#x4EA7;&#x54C1;&#x7684;&#x5FC3;&#x90FD;&#x6709;&#x4E86;&#xFF0C;&#x8BDD;&#x867D;&#x5982;&#x6B64;&#xFF0C;&#x5DE5;&#x4F5C;&#x8FD8;&#x662F;&#x5F97;&#x7EE7;&#x7EED;&#xFF0C;&#x8FD9;&#x65F6; <code>git reset</code> &#x5C31;&#x53EF;&#x4EE5;&#x6D3E;&#x4E0A;&#x7528;&#x573A;&#x4E86;&#x3002;</p>
<p>&#x5C06;&#x7248;&#x672C;&#x56DE;&#x9000;&#x5230;&#x4E0A;&#x4E00;&#x7248;&#x672C;&#x3002;</p>
<pre><code>git reset --hard HEAD~1
</code></pre><p>&#x5C06;&#x7248;&#x672C;&#x56DE;&#x9000;&#x5230;&#x4E09;&#x4E2A;&#x7248;&#x672C;&#x524D;&#x3002;</p>
<pre><code>git reset --hard HEAD~3
</code></pre><p>&#x4E5F;&#x53EF;&#x4EE5;&#x6307;&#x5B9A;&#x56FA;&#x5B9A;&#x7684;&#x7248;&#x672C;&#x8FDB;&#x884C;&#x56DE;&#x9000;&#xFF0C;&#x5148;&#x4F7F;&#x7528; <code>git log --pretty=oneline</code> &#x547D;&#x4EE4;&#x67E5;&#x770B;&#x5386;&#x53F2;&#x8BB0;&#x5F55;&#xFF0C;&#x5C06;&#x60F3;&#x8981;&#x56DE;&#x9000;&#x7248;&#x672C;&#x7684; commit id &#x590D;&#x5236;&#x4E00;&#x4E0B;&#xFF0C;&#x56DE;&#x9000;&#x65F6;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A; commit id &#x8FDB;&#x884C;&#x56DE;&#x9000;&#x3002;</p>
<pre><code>git reset --hard 485776d96f57db88c6a6f31146532d21fc01b1ab
</code></pre><p>&#x63A5;&#x7740;&#x4F7F;&#x7528; <code>git push -f</code> &#x5C06;&#x56DE;&#x9000;&#x7248;&#x672C;&#x540E;&#x7684;&#x5206;&#x652F;&#x5F3A;&#x5236;&#x63A8;&#x9001;&#x5230;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#xFF0C;&#x8FD9;&#x6837;&#x672C;&#x5730;&#x5206;&#x652F;&#x548C;&#x8FDC;&#x7A0B;&#x5206;&#x652F;&#x5C31;&#x540C;&#x6B65;&#x4E86;&#x3002;</p>
<pre><code>git push -f
</code></pre><h3 id="&#x89E3;&#x51B3;&#x51B2;&#x7A81;">&#x89E3;&#x51B3;&#x51B2;&#x7A81;</h3>
<p>&#x5F53;&#x6267;&#x884C; <code>git pull</code>&#xFF0C;&#x5C06;&#x8FDC;&#x7A0B;&#x5206;&#x652F;&#x548C;&#x672C;&#x5730;&#x5206;&#x652F;&#x5408;&#x5E76;&#x65F6;&#xFF0C;&#x6709;&#x53EF;&#x80FD;&#x4F1A;&#x51FA;&#x73B0;&#x51B2;&#x7A81;&#x7684;&#x60C5;&#x51B5;&#x3002;
&#x4F8B;&#x5982;&#x6709; A &#x548C; B &#x4E24;&#x4E2A;&#x4EBA;&#xFF0C;&#x5BF9;&#x540C;&#x4E00;&#x6587;&#x4EF6; <code>test.txt</code> &#x8FDB;&#x884C;&#x4E86;&#x4FEE;&#x6539;&#x3002;A &#x4FEE;&#x6539;&#x5B8C;&#x540E;&#x5148;&#x63D0;&#x4EA4;&#x5230;&#x4E86;&#x8FDC;&#x7A0B;&#x5206;&#x652F;&#xFF0C;&#x5F53; B &#x8981;&#x63D0;&#x4EA4;&#x65F6;&#xFF0C;&#x6267;&#x884C; <code>git pull</code>&#xFF0C;&#x53D1;&#x73B0;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#x7684; <code>test.txt</code> &#x548C;&#x81EA;&#x5DF1;&#x672C;&#x5730;&#x7684;&#x7248;&#x672C;&#x6709;&#x51B2;&#x7A81;&#x3002;</p>
<pre><code>### &#x4EE5;&#x592A;&#x7F51;&#x7684;&#x7684;&#x4FE1;&#x9053;&#x5229;&#x7528;&#x7387;
### &#x4EE5;&#x592A;&#x7F51;&#x7684;&#x7684;&#x4FE1;&#x9053;&#x5229;&#x7528;&#x7387;
&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
aaaaaa
=======
bbb
&gt;&gt;&gt;&gt;&gt;&gt;&gt; 9ccc398514d6a80a6ea2e44ade8171660d15cacf
### &#x4EE5;&#x592A;&#x7F51;&#x7684;&#x7684;&#x4FE1;&#x9053;&#x5229;&#x7528;&#x7387;
### &#x4EE5;&#x592A;&#x7F51;&#x7684;&#x7684;&#x4FE1;&#x9053;&#x5229;&#x7528;&#x7387;
</code></pre><p>&#x4ECE;&#x4E0A;&#x9762;&#x7684;&#x4EE3;&#x7801;&#x53EF;&#x4EE5;&#x770B;&#x51FA;&#xFF0C;&#x5F53;&#x524D;&#x7248;&#x672C;&#x7684;&#x6587;&#x4EF6;&#x5185;&#x5BB9; <code>aaaaaa</code> &#x548C;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9; <code>bbb</code> &#x4EA7;&#x751F;&#x4E86;&#x51B2;&#x7A81;&#x3002;
&#x51B2;&#x7A81;&#x7528; <code>&lt;&lt;&lt;</code> <code>====</code> <code>&gt;&gt;&gt;&gt;</code> &#x5C06;&#x4EA7;&#x751F;&#x51B2;&#x7A81;&#x7684;&#x5185;&#x5BB9;&#x5206;&#x9694;&#x5F00;&#xFF0C;&#x5982;&#x679C;&#x4F60;&#x89C9;&#x5F97;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#x7684;&#x5185;&#x5BB9;&#x4E0D;&#x5BF9;&#xFF0C;&#x8981;&#x6362;&#x6210;&#x81EA;&#x5DF1;&#x7684;&#xFF0C;&#x90A3;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x6539;&#x3002;</p>
<pre><code>### &#x4EE5;&#x592A;&#x7F51;&#x7684;&#x7684;&#x4FE1;&#x9053;&#x5229;&#x7528;&#x7387;
### &#x4EE5;&#x592A;&#x7F51;&#x7684;&#x7684;&#x4FE1;&#x9053;&#x5229;&#x7528;&#x7387;
aaaaaa
### &#x4EE5;&#x592A;&#x7F51;&#x7684;&#x7684;&#x4FE1;&#x9053;&#x5229;&#x7528;&#x7387;
### &#x4EE5;&#x592A;&#x7F51;&#x7684;&#x7684;&#x4FE1;&#x9053;&#x5229;&#x7528;&#x7387;
</code></pre><p>&#x628A; <code>&lt;&lt;&lt;</code> <code>===</code> <code>&gt;&gt;&gt;</code> &#x5220;&#x9664;&#x6389;&#xFF0C;&#x5E76;&#x66FF;&#x6362;&#x6210;&#x81EA;&#x5DF1;&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x518D;&#x6267;&#x884C; <code>git add</code> <code>git commit</code> &#x63D0;&#x4EA4;&#x5185;&#x5BB9;&#x3002; &#x8FD9;&#x65F6;&#xFF0C;&#x6267;&#x884C; <code>git pull</code>&#xFF0C;&#x4F60;&#x4F1A;&#x53D1;&#x73B0;&#x6CA1;&#x6709;&#x66F4;&#x65B0;&#xFF0C;&#x521A;&#x4FEE;&#x6539;&#x7684;&#x5185;&#x5BB9;&#x4E5F;&#x4E0D;&#x4F1A;&#x53D8;&#xFF0C;&#x6700;&#x540E;&#x518D;&#x6267;&#x884C; <code>git push</code> &#x5C06;&#x5185;&#x5BB9;&#x63A8;&#x9001;&#x5230;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#x3002;</p>
<h2 id="&#x53C2;&#x8003;&#x8D44;&#x6599;">&#x53C2;&#x8003;&#x8D44;&#x6599;</h2>
<ul>
<li><a href="https://www.liaoxuefeng.com/wiki/896043488029600" target="_blank">Git&#x6559;&#x7A0B;-&#x5ED6;&#x96EA;&#x5CF0;</a></li>
</ul>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="git commit style.html" class="navigation navigation-prev " aria-label="Previous page: Git Commit Style">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="high-quality-code.html" class="navigation navigation-next " aria-label="Next page: High Quality Code">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Git Commands","level":"1.21","depth":1,"next":{"title":"High Quality Code","level":"1.22","depth":1,"path":"前端进阶/high-quality-code.md","ref":"前端进阶/high-quality-code.md","articles":[]},"previous":{"title":"Git Commit Style","level":"1.20","depth":1,"path":"前端进阶/git commit style.md","ref":"前端进阶/git commit style.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["summary","livereload"],"pluginsConfig":{"summary":{},"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"前端进阶/git-commands.md","mtime":"2021-02-15T12:04:36.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-03-24T08:50:55.666Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

